package com.xh.pojo;




import com.sun.istack.internal.NotNull;
import com.xh.anno.SellState;
import com.xh.anno.State;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.URL;


import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;
@Data
@NoArgsConstructor
public class Article {
    private Integer id;//主键ID
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String title;//商品标题
    @NotEmpty
    private String content;//文章简介内容
    @NotNull
    private Double money;//商品价格
    @NotEmpty
    @URL
    private String coverImg;//商品封面图像

    @State
    private String state;//发布状态 已发布|草稿

    @SellState
    private String sellstate;//销售状态 未销售 | 已销售
    @NotNull
    private Integer categoryId;//文章分类id
    private Integer createUser;//创建人ID
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//更新时间
}
